package com.net.oil.user.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.bean.ListDate;
import com.net.oil.user.bean.RecommendBean;
import com.net.oil.user.contract.MyRecommendListContract;
import com.net.oil.user.model.MyRecommendListModel;

import java.util.List;

/**
 * 作者：lch
 * 时间：2018/10/9 0009:下午 21:41
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class MyRecommendListPresenter extends BasePresenter<MyRecommendListContract.View> implements MyRecommendListContract.Presenter {

    private MyRecommendListContract.View view;
    private MyRecommendListContract.Model model;

    public MyRecommendListPresenter(MyRecommendListContract.View view) {
        this.view = view;
        model = new MyRecommendListModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getRecommendList(int page, int rows) {
        model.getRecommendList(page, rows);
    }

    @Override
    public void getRecommendListSuccess(ListDate<RecommendBean> recommendBeans) {
        view.getRecommendListSuccess(recommendBeans);
    }

    @Override
    public void getRecommendListFailed() {
        view.getRecommendListFailed();
    }
}
